import request from '@/utils/request'

// 查询基础字段列表
export function listDataProperty(query) {
  return request({
    url: '/system/dataProperty/list',
    method: 'get',
    params: query
  })
}

// 查询基础字段详细
export function getDataProperty(id) {
  return request({
    url: '/system/dataProperty/' + id,
    method: 'get'
  })
}

// 新增基础字段
export function addDataProperty(data) {
  return request({
    url: '/system/dataProperty',
    method: 'post',
    data: data
  })
}

// 新增字段判重
export function addRemovingRepeat(nameEn, commonDataPropertyId, classesId) {
  return request({
    url: '/system/dataProperty/addRemovingRepeat/'+nameEn+"/"+commonDataPropertyId+"/"+classesId,
    method: 'get'
  })
}

// 修改基础字段
export function updateDataProperty(data) {
  return request({
    url: '/system/dataProperty',
    method: 'put',
    data: data
  })
}

// 删除基础字段
export function delDataProperty(id) {
  return request({
    url: '/system/dataProperty/' + id,
    method: 'delete'
  })
}

// 导出基础字段
export function exportDataProperty(query) {
  return request({
    url: '/system/dataProperty/export',
    method: 'get',
    params: query
  })
}
